//package com.example.controller.service;
//
//
//import lombok.extern.slf4j.Slf4j;
//import org.apache.rocketmq.spring.annotation.MessageModel;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.stereotype.Component;
//import org.springframework.stereotype.Service;
//
///**
// * 设置消息监听
// * 监听组：监听topic：监听tag(默认监听topic下所有)
// * 监听消费模式:默认负载均衡：CLUSTERING（每一个消息只发给一个消费者）、广播模式：BROADCASTING（发送给所有消费者）
// *
// */
//@Component
//@Service
//@RocketMQMessageListener(consumerGroup = "${rocketmq.producer.group}", topic = "${rocketmq.producer.topic}",
//        selectorExpression = "${rocketmq.producer.tags}", messageModel = MessageModel.BROADCASTING)
//@Slf4j
//public class Consumer implements RocketMQListener<String> {
//    @Override
//    public void onMessage(String message) {
//        System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&");
//        System.out.println(message);
//    }
//}
